import Vue from 'vue'
import axios from "axios"
import App from './App.vue'
import router from "./route/routes"
import 'vant/lib/index.css';
import Vuex from "vuex"
//import "./plugins/reset.css"

import { Tabbar, TabbarItem ,PullRefresh, List, Toast,Col, Row ,Image as VanImage
         ,Cell, CellGroup , Grid, GridItem ,Skeleton,Uploader,Button ,Field,NavBar,Popup,Search,Switch,Slider,Dialog,Notify,Stepper} from 'vant';
          

Vue.use(NavBar);
Vue.use(Field);
Vue.use(Button);
Vue.use(Uploader);
Vue.use(Skeleton);
Vue.use(Grid);
Vue.use(GridItem);
Vue.use(Cell);
Vue.use(CellGroup);
Vue.use(PullRefresh);
Vue.use(List);
Vue.use(Toast);
Vue.use(Tabbar);
Vue.use(TabbarItem);
Vue.use(Col);
Vue.use(Row);
Vue.use(VanImage);
Vue.use(Popup);
Vue.use(Search);
Vue.use(Vuex)
Vue.use(Switch);
Vue.use(Slider)
Vue.use(Dialog);
Vue.use(Notify);
Vue.use(Stepper);


axios.defaults.withCredentials=true
axios.defaults.crossDomain=true
// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'
// axios.defaults.headers.get['Content-Type'] = 'application/xml';

Vue.prototype.$axios = axios; //全局配置注册，使用时是：this.$axios
Vue.prototype.$api='http://49.235.166.90:5055/'
Vue.config.productionTip = false
// 将所有 loading Toast 设置为背景不可点击
Toast.setDefaultOptions('loading', { forbidClick: true });

const store = new Vuex.Store({
  state: {
    count: 0,
    userId:2017312778,
    grade: 2017,
    college: '大数据',
    usename: '李鑫宇',
    weight:4,
    imgSrc : '',
    // 页面跳转后，数据存储
    cropData : '',
    // 保存上一步的图像数据
    prevCanData : [

    ],
    noBgCan : [],
    linePoint : [],
    targetColor : '',
  }
})



new Vue({
  render: h => h(App),
  router,
  store
}).$mount('#app')
